package com.youaishujuhui.devops.web.po.db;

import java.util.ArrayList;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class InfocenterDbBakPO implements Comparable<InfocenterDbBakPO> {

	private String ip;

	private List<InfocenterDbBakItemPO> items = new ArrayList<>();
	
	private String color;

	@Override
	public int compareTo(InfocenterDbBakPO o) {
		if (getColor().equals(o.getColor())) {
			return 0;
		}
		
		if (getColor().equals("White")) {
			return 1;
		}
		
		return -1;
	}
}
